<html>
<head><meta charset="utf-8"><title>Debugging a disappeared StorageDead · t-compiler/wg-mir-opt · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/index.html">t-compiler/wg-mir-opt</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Debugging.20a.20disappeared.20StorageDead.html">Debugging a disappeared StorageDead</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="226999334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Debugging%20a%20disappeared%20StorageDead/near/226999334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Debugging.20a.20disappeared.20StorageDead.html#226999334">(Feb 19 2021 at 17:37)</a>:</h4>
<p>In a branch I'm working on MIR generation (rustc_mir_build) and I'm having a weird problem where if I change MIR generation slightly one of the <code>StorageDead</code>s in the program disappear and I get compile errors later in compilation. The block for the <code>StorageDead</code> still exists, with the same instructions as before, except <code>StorageDead</code> is no longer generated. I'm trying to understand why. Any tips on where to start reading?</p>



<a name="227000998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Debugging%20a%20disappeared%20StorageDead/near/227000998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> osa1 <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Debugging.20a.20disappeared.20StorageDead.html#227000998">(Feb 19 2021 at 17:49)</a>:</h4>
<p>Because of this bug I currently have a <code>StorageLive(_4)</code> in my program with no corresponding <code>StorageDead(_4)</code>. I'm wondering if this kind of bugs could be detected when the MIR builder is dropped.</p>



<a name="227240690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Debugging%20a%20disappeared%20StorageDead/near/227240690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Notification Bot <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Debugging.20a.20disappeared.20StorageDead.html#227240690">(Feb 22 2021 at 09:42)</a>:</h4>
<p>This topic was moved here from <a class="stream-topic" data-stream-id="182449" href="/#narrow/stream/182449-t-compiler.2Fhelp/topic/Debugging.20a.20disappeared.20StorageDead">#t-compiler/help &gt; Debugging a disappeared StorageDead</a> by <span class="user-mention silent" data-user-id="124288">oli</span></p>



<a name="227240933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Debugging%20a%20disappeared%20StorageDead/near/227240933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Debugging.20a.20disappeared.20StorageDead.html#227240933">(Feb 22 2021 at 09:45)</a>:</h4>
<p>I think what you are looking for may be "scopes": <a href="https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_build/src/build/scope.rs">https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_build/src/build/scope.rs</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>